package com.dfiov.cloud.msmtools.contant.msdevice;

import com.dfiov.cloud.msmtools.contant.msbluetooth.BluetoothKeyStatusEnum;

public enum RealNameStatusEnum {
    WAITTING("WAITTING",0,"等待认证"),
    CERTIFIED("CERTIFIED",1,"认证通过"),
    FAILED("FAILED",2,"认证失败"),
    LOGOUT("LOGOUT",3,"注销");
    private String key;
    private Integer value;
    private String info;

    public String getKey() {return this.key;}
    public Integer getValue() {return this.value;}
    public String getInfo() {return this.info;}

    RealNameStatusEnum(String key, Integer value, String info) {
        this.key = key;
        this.value = value;
        this.info = info;
    }

    public static RealNameStatusEnum getEnumByValue(Integer value) {
        for(RealNameStatusEnum realNameStatusEnum : RealNameStatusEnum.values()) {
            if(realNameStatusEnum.getValue().equals(value)) {
                return realNameStatusEnum;
            }
        }
        return null;
    }

    public static String getInfoByValue(Integer value) {
        RealNameStatusEnum realNameStatusEnum = getEnumByValue(value);
        if(realNameStatusEnum == null) {
            return null;
        }
        return realNameStatusEnum.getInfo();
    }
}
